<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .coor {
        width: 600px;
        height: 300px;
        border-left: 1px solid rgb(126, 124, 124);
        border-bottom: 1px solid rgb(126, 124, 124);
        margin: 0 auto;
        display: flex;
    }

    div[class^=zu] {
        height: 300px;
        flex: 1;
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
    }

    div[class^=tu] {
        width: 30px;
        height: 50px;
        background-color: #e23131;
        margin: 0 auto;
    }



    p {
        display: block;
        margin-bottom: 0px;
    }

    span {
        margin-bottom: -21px;


    }
</style>

<body>
    <script>
        let n = +prompt(`请输入数据的组数`)
        let arr = []
        for (let i = 0; i < n; i++) {
            arr.push(prompt(`请输入第${i}数据`))
        }
        document.write(` <div class="coor">`)
        for (i = 0; i < arr.length; i++) {
            document.write(`
        <div class="zu" >
            <span>第${i + 1}季度</span>
            <div class="tu" style="height:${arr[i]}px"></div>
            <p>${arr[i]}</p>
        </div>
`)
        }
        document.write(` </div>`)



    </script>
</body>

</html>